<template>
  <div>
    <ul class="mui-table-view">
      <li class="mui-table-view-cell mui-media" v-for='item in newsList' :key='item.id'>
        <router-link :to="'/home/newsInfo/'+item.id">
          <img class="mui-media-object mui-pull-left" :src="item.url">
          <div class="mui-media-body" >{{item.title}}
            <p class="mui-ellipsis">{{item.content}}</p>
            <p>{{item.time | dateFormt("YYYY-MM-DD")}}</p>
          </div>    
        </router-link>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
    data(){
        return {
            newsList:[]
        }
    },
    created(){
        this.getNewsList();
    },
    methods:{
        getNewsList(){
            this.$http.get('../../mess.json').then((res)=>{
                this.newsList = res.body.news
            })
        }
    }
};
</script>
<style>
</style>

